package com.ruoyi.customer.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.common.core.domain.UserEntity;
import com.ruoyi.market.domain.ConfigBase;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
 * 客户对象 customer_user
 * 
 * @author ruoyi
 */
public class CustomerUser extends UserEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户ID */
    @Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
    private Long userId;

    /** 是否分销 */
    @Excel(name = "是否分销", readConverterExp = "Y=是,N=否, 未知")
    private String isDistributors;

    /** 是否店员 */
    @Excel(name = "是否店员", readConverterExp = "Y=是,N=否, 未知")
    private String isEmployee;

    /** 用户余额 */
    private BigDecimal balance;

    /** 邀请用户ID */
    private Long inviteId;

    /** 用户等级 */
    private int userLevel;

    /** 用户openId */
    private String openId;

    /** 店铺ID */
    private String shopId;

    /** 用户unionId */
    private String unionId;

    /** 用户appId */
    private String appId;

    /** 用户来源类型 */
    private String sourceType;

    /** 所属店铺信息   */
    private ConfigBase shopInfo;

    public CustomerUser()
    {

    }

    public CustomerUser(Long userId)
    {
        this.userId = userId;
    }


    public BigDecimal getBalance(){ return balance;}

    public void setBalance(BigDecimal balance){ this.balance = balance; }

    public Long getUserId()
    {
        return userId;
    }

    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public String getShopId(){ return shopId; }

    public void setShopId(String shopId){ this.shopId = shopId; }

    public Long getInviteId()
    {
        return inviteId;
    }

    public void setInviteId(Long inviteId)
    {
        this.inviteId = inviteId;
    }

    public String getIsDistributors()
    {
        return isDistributors;
    }

    public void setIsDistributors(String isDistributors) { this.isDistributors = isDistributors; }

    public String getIsEmployee()
    {
        return isEmployee;
    }

    public void setIsEmployee(String isEmployee) { this.isEmployee = isEmployee; }

    public int getUserLevel()
    {
        return userLevel;
    }

    public void setUserLevel(int userLevel)
    {
        this.userLevel = userLevel;
    }

    public String getOpenId()
    {
        return openId;
    }

    public void setOpenId(String openId) { this.openId = openId; }

    public String getUnionId()
    {
        return unionId;
    }

    public void setUnionId(String unionId) { this.unionId = unionId; }

    public String getAppId()
    {
        return appId;
    }

    public void setAppId(String appId) { this.appId = appId; }

    public String getSourceType()
    {
        return sourceType;
    }

    public void setSourceType(String sourceType) { this.sourceType = sourceType; }

    public ConfigBase getShopInfo()
    {
        return shopInfo;
    }

    public void setShopInfo(ConfigBase shopInfo)
    {
        this.shopInfo = shopInfo;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("userId", getUserId())
                .append("wxId", getWxId())
                .append("shopId", getShopId())
                .append("userName", getUserName())
                .append("nickName", getNickName())
                .append("email", getEmail())
                .append("phonenumber", getPhonenumber())
                .append("sex", getSex())
                .append("avatar", getAvatar())
                .append("password", getPassword())
                .append("inviteId", getInviteId())
                .append("delFlag", getDelFlag())
                .append("loginIp", getLoginIp())
                .append("loginDate", getLoginDate())
                .append("userLevel", getUserLevel())
                .append("inviteId", getInviteId())
                .append("active", getActive())
                .append("birthday", getBirthday())
                .append("address", getAddress())
                .append("addressCode", getAddressCode())
                .append("coordinate", getCoordinate())
                .append("score", getScore())
                .append("isDistributors", getIsDistributors())
                .append("isEmployee", getIsEmployee())
                .append("balance", getBalance())
                .append("appId", getAppId())
                .append("openId", getOpenId())
                .append("unionId", getUnionId())
                .append("sourceType", getSourceType())
                .append("shopInfo", getShopInfo())
                .append("params", getParams())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
